import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const useCounterStore = defineStore('user', () => {
  let piniaData = ref({
    username: localStorage.getItem('username'),
    name: '原型大师',
    vip: '铂金会员',
    img: 'https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg'
  })

  return { piniaData }
},
  // 持久化
  {
    persist: true,
  },
)
